/*
 * Eugen Stoian <stoian.e@gmail.com> 2010
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef PLOTABLEOBJECT3D_H
#define PLOTABLEOBJECT3D_H

#include <Object.h>
#include <QColor>
#include <GL/gl.h>
#include <Point.h>
class PlotableObject3D : public Object
{
    Q_OBJECT
public:
    PlotableObject3D(QObject * parent = 0);

    virtual void display();

    GLuint id() const;

    virtual void compile();

    virtual Object* clone() const = 0;

    virtual void draw()= 0;

    QColor color() const;

    double xMin() const;

    double yMin() const;

    double zMin() const;

    double xMax() const;

    double yMax() const;

    double zMax() const;

    double xCenter() const;

    double yCenter() const;

    double zCenter() const;

    virtual double radius() const;

    virtual bool isValid() const = 0;

    virtual bool isEmpty() const = 0;

signals:
    void changed();

public slots:
    void setColor(const QColor& color);

    virtual void compute() = 0;

    void reset();

protected:
    virtual void cleanUp();

protected:
    QColor _color;
    GLuint _id;
    double _xMin;
    double _yMin;
    double _zMin;
    double _xMax;
    double _yMax;
    double _zMax;
};

#endif // PLOTABLEOBJECT3D_H
